#ifndef MDATAMANAGER_H
#define MDATAMANAGER_H
#include <QObject>
#include "QTextCodec"
#include "QTextStream"
#include "QStringList"
#include <QtCore/QCoreApplication>
#include "QDomDocument"
#include "QFile"
#include "mprocess.h"
class ProcessSet{
public:
    int processID; //ID
    QPointF processPos; //位置
    QString processLabel;  //文字标注
    QColor labelColor;  //颜色
};

class ArrowSet{
public:
    int arrowID;
    int startID;
    int endID;
    QColor arrowColor;

};

class mDataManager
{
public:
    mDataManager(void);
    ~mDataManager(void);
    QList<ProcessSet> list_Process;
    QList<ArrowSet>list_Arrow;
    bool AddProcess(int ID,QPointF pos,QString text,QColor color);
    bool DeleteProcess(int id);
    bool AddArrow(int id,int startID,int endID,QColor color);
    bool DeleteArrow(int id);
    bool SaveFile(QString filepath);
    int GetProcessID() const
    {return AutoProcessID;}
    int GetArrowID() const
    {return AutoArrowID;}



private:
    int AutoProcessID;
    int AutoArrowID;
};
#endif // MDATAMANAGER_H
